import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Test from '@/pages/Test'
import TestFirst from '@/pages/TestFirst'
import TestRender from '@/pages/TestRender'
import TestVuex from '@/pages/TestVuex'
import TestTransition from '@/pages/TestTransition'
import TestCommunication from '@/pages/TestCommunication'
import TestArray from '@/pages/TestArray'
import TestLayout from '@/pages/TestLayout'
import Create from '@/pages/Create'
import CreateImport from '@/pages/CreateImport'
import CreatePicker from '@/pages/CreatePicker'

Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
    {
      path: '/Hello',
      name: 'HelloWorld',
      component: HelloWorld
    },{
      path:'/',
      redirect:'/Test'
    },
    {
      path: '/Test',
      name: 'Test',
      component: Test,
      children: [{path: "/TestFirst",name: "TestFirst",component:TestFirst},
        {path: "/TestRender",name: "TestRender",component:TestRender},
        {path:'/TestVuex',name:'TestVuex',component:TestVuex},
        {path:'/TestTransition',name:'TestTransition',component:TestTransition},
        {path:'/TestCommunication',name:'TestCommunication',component:TestCommunication},
        {path:'/TestArray',name:'TestArray',component:TestArray},
        {path:'/TestLayout',name:'TestLayout',component:TestLayout},
      ]
    },
    {
      path:'/Create',
      name:'Create',
      component: Create,
      children:[
        {path:'/CreateImport',name:'CreateImport',component:CreateImport},
        {path:'/CreatePicker',name:'CreatePicker',component:CreatePicker}
      ]
    }
  ]
})
